package ModelLayer;

import java.util.ArrayList;


/**
 * Write a description of class DVDContainer here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class DVDContainer
{
    // instance variables - replace the example below with your own
    private ArrayList<DVD> thing;
    private static DVDContainer instance=null;
    /**
     * Constructor for objects of class DVDCtr
     */
    private DVDContainer()
    {
        //set up references to containers  
        thing = new ArrayList<DVD>();
    }
    public static DVDContainer getInstance()
    {
        if(instance==null)
        {
            instance = new DVDContainer();
        }
        return instance;
    }
    //Dummy implementation: after implementing the model layer 
    //objects of class DVD are to be returned, not String
    
    
    //Dummy implementation: more parameters are probaly to added
    public void createDVD(String id, String title, String artist, String date)
    {       
          //this method constructs a new dvd object 
          //and stores it in the container
          DVD newD = new DVD(id, title, artist, date);
          
          thing.add(newD);
    }
    
    
    
    
    
    
    
    public ArrayList<DVD> listAllDvds()
    {
          //returns a list of all dvds and their associated copies
          return thing;
    }
    
    public String getTitle(int x)  
    {
        return thing.get(x).getTitle();
    }
    
    
}
